maintenance: Add maintenance script for managing foreign resources